package br.com.async.core.domain.bookmark;

import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import br.com.async.core.domain.AbstractBookmarks;

@Entity(name = "tb_evaluation")
public class Evaluation implements AbstractBookmarks {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@SequenceGenerator(allocationSize = 1, initialValue = 1, name = "evaluation_seq", sequenceName = "evaluation_seq")
	@GeneratedValue(generator = "evaluation_seq", strategy = GenerationType.AUTO)
	@JoinColumn(nullable = false)
	private Integer code;
	@Temporal(TemporalType.TIMESTAMP)
	private Calendar calendar;
	private Boolean useOfService;
	private Boolean indication;
	private Integer treatment;
	private Integer location;
	private Integer environment;
	private Integer menu;
	private Integer clarityOfInformation;
	private String comment;

	public Evaluation() {

	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public Calendar getCalendar() {
		return calendar;
	}

	public void setCalendar(Calendar calendar) {
		this.calendar = calendar;
	}

	public Boolean getUseOfService() {
		return useOfService;
	}

	public void setUseOfService(Boolean useOfService) {
		this.useOfService = useOfService;
	}

	public Boolean getIndication() {
		return indication;
	}

	public void setIndication(Boolean indication) {
		this.indication = indication;
	}

	public Integer getTreatment() {
		return treatment;
	}

	public void setTreatment(Integer treatment) {
		this.treatment = treatment;
	}

	public Integer getLocation() {
		return location;
	}

	public void setLocation(Integer location) {
		this.location = location;
	}

	public Integer getEnvironment() {
		return environment;
	}

	public void setEnvironment(Integer environment) {
		this.environment = environment;
	}

	public Integer getMenu() {
		return menu;
	}

	public void setMenu(Integer menu) {
		this.menu = menu;
	}

	public Integer getClarityOfInformation() {
		return clarityOfInformation;
	}

	public void setClarityOfInformation(Integer clarityOfInformation) {
		this.clarityOfInformation = clarityOfInformation;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((calendar == null) ? 0 : calendar.hashCode());
		result = prime
				* result
				+ ((clarityOfInformation == null) ? 0 : clarityOfInformation
						.hashCode());
		result = prime * result + ((code == null) ? 0 : code.hashCode());
		result = prime * result + ((comment == null) ? 0 : comment.hashCode());
		result = prime * result
				+ ((environment == null) ? 0 : environment.hashCode());
		result = prime * result
				+ ((indication == null) ? 0 : indication.hashCode());
		result = prime * result
				+ ((location == null) ? 0 : location.hashCode());
		result = prime * result + ((menu == null) ? 0 : menu.hashCode());
		result = prime * result
				+ ((treatment == null) ? 0 : treatment.hashCode());
		result = prime * result
				+ ((useOfService == null) ? 0 : useOfService.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Evaluation other = (Evaluation) obj;
		if (calendar == null) {
			if (other.calendar != null)
				return false;
		} else if (!calendar.equals(other.calendar))
			return false;
		if (clarityOfInformation == null) {
			if (other.clarityOfInformation != null)
				return false;
		} else if (!clarityOfInformation.equals(other.clarityOfInformation))
			return false;
		if (code == null) {
			if (other.code != null)
				return false;
		} else if (!code.equals(other.code))
			return false;
		if (comment == null) {
			if (other.comment != null)
				return false;
		} else if (!comment.equals(other.comment))
			return false;
		if (environment == null) {
			if (other.environment != null)
				return false;
		} else if (!environment.equals(other.environment))
			return false;
		if (indication == null) {
			if (other.indication != null)
				return false;
		} else if (!indication.equals(other.indication))
			return false;
		if (location == null) {
			if (other.location != null)
				return false;
		} else if (!location.equals(other.location))
			return false;
		if (menu == null) {
			if (other.menu != null)
				return false;
		} else if (!menu.equals(other.menu))
			return false;
		if (treatment == null) {
			if (other.treatment != null)
				return false;
		} else if (!treatment.equals(other.treatment))
			return false;
		if (useOfService == null) {
			if (other.useOfService != null)
				return false;
		} else if (!useOfService.equals(other.useOfService))
			return false;
		return true;
	}
	
	
	

	

}
